/**
 * 数组转为选型
 * @param labelKey
 * @param valueKey
 * @param arr
 * @returns
 */
export type Option = {
  label: string;
  value: any
}

export function arrayToOptions(labelKey: string, valueKey: string, arr: any[]): Option[] {
  return arr.map(item => ({
    label: item[labelKey],
    value: item[valueKey]
  }))
}
